#[allow(clippy::unused_unit)]
fn do_something() -> () {}

fn main() {
    // When you don't return anything in a function, you actually return an
    // empty tuple.
    #[allow(clippy::let_unit_value)]
    {
        dbg!(do_something());
        let res = do_something();
        dbg!(&res);
    }

    println!();

    {
        let random_tuple = ("Here is a name", 8, vec!['a'], 'b', [8, 9, 10], 7.7);
        println!(
            "Inside the tuple is: First item: {:?}
Second item: {:?}
Third item: {:?}
Fourth item: {:?}
Fifth item: {:?}
Sixth item: {:?}",
            random_tuple.0,
            random_tuple.1,
            random_tuple.2,
            random_tuple.3,
            random_tuple.4,
            random_tuple.5,
        )
    }

    println!();

    #[allow(clippy::useless_vec)]
    {
        let str_vec = vec!["one", "two", "three"];

        // Call them a, b, and c.
        let (a, b, c) = (str_vec[0], str_vec[1], str_vec[2]);
        println!("{:?}, {:?}, {:?}", a, b, c);

        // This is called destructuring. That is because first the variables are
        // inside a structure, but then we made a, b, and c that are not inside
        // a structure.

        // If you need to destructure but don't want all the variables, you can
        // use _.
        let (_, _, variable) = (str_vec[0], str_vec[1], str_vec[2]);
        // Now it only creates a variable called variable but doesn't make a
        // variable for the others.
        println!("{:?}", variable);
    }
}
